import java.util.ArrayList;
/**
 * The JournalCollections class.
 * 
 * @author (Jens Brobak) 
 * @version (1.0)
 */
public class JournalCollections
{
    private ArrayList<Journal> listOfJournals;

    public JournalCollections()
    {
        this.listOfJournals = new ArrayList<Journal>();
    }

    public void addJournal(Journal journal)
    {
        this.listOfJournals.add(journal);
    }

    public ArrayList<Journal> getJournalList(String empName)
    {
        for (Journal journal : listOfJournals)  
            if (empName == journal.getPublisher()) {
                System.out.println("You now have access to the Journal List, Congratulations!");
                return listOfJournals;
        }
        System.out.println("You don't have access to the Journal List!");
        return null;
    }
}